
<template>
  <div>
<van-tabbar v-model="active" route active-color="powderblue">
  <van-tabbar-item  to="/home" icon-prefix="icon"  icon="shouye9" size="24" >首页</van-tabbar-item>
  <van-tabbar-item  to="/cate" icon-prefix="icon"  icon="chazhaobiaodanliebiao">分类</van-tabbar-item>
  <van-tabbar-item  to="/cart"  icon-prefix="icon" icon="gouwuchekong" :badge="goodsNum" >购物车</van-tabbar-item>
  <van-tabbar-item  to="/center" icon-prefix="icon"  icon="xiaolian">个人中心</van-tabbar-item>
</van-tabbar>
  </div>
</template>

<script>

 export default {
  data() {
    return {
      active: 0,
      
    };
  },
 
  computed: {
    goodsNum(){
      return this.$store.state.goodsNum
    }
  }
};
</script>

<style lang="scss" scoped>

</style>
<style>

</style>